<!DOCTYPE html>
<!-- saved from url=(0044)http://hy.yungoucms.cn/?/mobile/mobile/glist -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>All merchandise</title>
<meta content="app-id=518966501" name="apple-itunes-app">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<link href="./all/comm.css" rel="stylesheet" type="text/css">
<link href="./all/goods.css" rel="stylesheet" type="text/css">
<link href="./all/main.css" rel="stylesheet" type="text/css">
<script src="./all/jquery190.js" language="javascript" type="text/javascript"></script>
<style>
.aui-iconfont{height:35px!important;}
i.zimgs {width: 20px;height: 22px;left: 3px;}
</style></head>

<body style="zoom: 1;">
<div class="h5-1yyg-v1" id="loadingPicBlock">
    <script src="./all/ajax.js"></script>
  <!-- 导航 -->
  <nav class="nav-wrapper" id="goodsNav">
    <input type="hidden" id="search" value="">
    <input type="hidden" id="parm_order" value="10">
    <input type="hidden" id="parm_cate" value="0">
    <!--点击添加或移除current-->
    <div class="select-btn current" id="divSort"> <span class="arrow-up" style="display: none;"></span> <span class="select-icon"> <i></i><i></i><i></i> </span> <span class="t_name">All merchandise</span> </div>
    <!--分类-->
    <div id="selectSort" class="select-total" style="display: none;">
      <ul class="sort_list">
        <li sortid="0" class="current"> <a href="javascript:;" onclick="check_shop(this);" cateid="0" catename="All merchandise">All merchandise</a>
          <input id="chk0" class="cateChk" type="checkbox" name="0" value="0">
          <label for="chk0"></label>
        </li>
                                <li sortid="154"> <a href="javascript:;" cateid="154" onclick="check_shop(this);" catename="123">123</a>
          <input id="chk154" class="cateChk" type="checkbox" name="cateChk" value="154">
          <label for="chk154"></label>
        </li>
                <li sortid="155"> <a href="javascript:;" cateid="155" onclick="check_shop(this);" catename="222">222</a>
          <input id="chk155" class="cateChk" type="checkbox" name="cateChk" value="155">
          <label for="chk155"></label>
        </li>
                <li sortid="156"> <a href="javascript:;" cateid="156" onclick="check_shop(this);" catename=""></a>
          <input id="chk156" class="cateChk" type="checkbox" name="cateChk" value="156">
          <label for="chk156"></label>
        </li>
                <li sortid="157"> <a href="javascript:;" cateid="157" onclick="check_shop(this);" catename=""></a>
          <input id="chk157" class="cateChk" type="checkbox" name="cateChk" value="157">
          <label for="chk157"></label>
        </li>
                <li sortid="159"> <a href="javascript:;" cateid="159" onclick="check_shop(this);" catename=""></a>
          <input id="chk159" class="cateChk" type="checkbox" name="cateChk" value="159">
          <label for="chk159"></label>
        </li>
                <li sortid="160"> <a href="javascript:;" cateid="160" onclick="check_shop(this);" catename=""></a>
          <input id="chk160" class="cateChk" type="checkbox" name="cateChk" value="160">
          <label for="chk160"></label>
        </li>
                <li sortid="161"> <a href="javascript:;" cateid="161" onclick="check_shop(this);" catename=""></a>
          <input id="chk161" class="cateChk" type="checkbox" name="cateChk" value="161">
          <label for="chk161"></label>
        </li>
                <li sortid="162"> <a href="javascript:;" cateid="162" onclick="check_shop(this);" catename=""></a>
          <input id="chk162" class="cateChk" type="checkbox" name="cateChk" value="162">
          <label for="chk162"></label>
        </li>
                <li sortid="165"> <a href="javascript:;" cateid="165" onclick="check_shop(this);" catename=""></a>
          <input id="chk165" class="cateChk" type="checkbox" name="cateChk" value="165">
          <label for="chk165"></label>
        </li>
                <li sortid="167"> <a href="javascript:;" cateid="167" onclick="check_shop(this);" catename=""></a>
          <input id="chk167" class="cateChk" type="checkbox" name="cateChk" value="167">
          <label for="chk167"></label>
        </li>
                <li sortid="168"> <a href="javascript:;" cateid="168" onclick="check_shop(this);" catename=""></a>
          <input id="chk168" class="cateChk" type="checkbox" name="cateChk" value="168">
          <label for="chk168"></label>
        </li>
                <li sortid="169"> <a href="javascript:;" cateid="169" onclick="check_shop(this);" catename=""></a>
          <input id="chk169" class="cateChk" type="checkbox" name="cateChk" value="169">
          <label for="chk169"></label>
        </li>
                <li sortid="171"> <a href="javascript:;" cateid="171" onclick="check_shop(this);" catename=""></a>
          <input id="chk171" class="cateChk" type="checkbox" name="cateChk" value="171">
          <label for="chk171"></label>
        </li>
                <li sortid="173"> <a href="javascript:;" cateid="173" onclick="check_shop(this);" catename=""></a>
          <input id="chk173" class="cateChk" type="checkbox" name="cateChk" value="173">
          <label for="chk173"></label>
        </li>
                <li sortid="174"> <a href="javascript:;" cateid="174" onclick="check_shop(this);" catename=""></a>
          <input id="chk174" class="cateChk" type="checkbox" name="cateChk" value="174">
          <label for="chk174"></label>
        </li>
                <li sortid="175"> <a href="javascript:;" cateid="175" onclick="check_shop(this);" catename=""></a>
          <input id="chk175" class="cateChk" type="checkbox" name="cateChk" value="175">
          <label for="chk175"></label>
        </li>
                <li sortid="176"> <a href="javascript:;" cateid="176" onclick="check_shop(this);" catename=""></a>
          <input id="chk176" class="cateChk" type="checkbox" name="cateChk" value="176">
          <label for="chk176"></label>
        </li>
                         <li id="myCollect"> <a href="http://hy.yungoucms.cn/?/mobile/mobile/glist/101">PK zone</a> </li>
        <li id="myCollect"> <a href="http://hy.yungoucms.cn/?/mobile/home/mycollect">My collection</a> </li>
      </ul>
    </div>
    <div class="select-btn" id="divOrder"> <span>Soon to be announced</span> </div>
    <div id="selectOrder" class="select-total" style="display: none;">
      <ul class="order_list">
        <li order="10" class="current"><a href="javascript:;">Soon to be announced</a></li>
        <li order="20"><a href="javascript:;">Popularity</a></li>
        <li order="30"><a href="javascript:;">Newest</a></li>
        <li order="50"><a href="javascript:;">high price↑</a></li>
        <li order="60"><a href="javascript:;">low price↓</a></li>
      </ul>
    </div>
  </nav>
  <!-- 列表 -->
  <div class="goodsList goodsList2" style="top: 49px;">
    <ul id="2095"><li><a href="http://hy.yungoucms.cn/?/mobile/mobile/item/2095"><span id="2095" class="z-Limg"><img src="./all/goods.jpg"></span><div class="goodsListR"><h2 id="2095">(Phase 3 )test</h2><p class="price">value:<em class="arial gray"> ₹100</em></p><div class="pRate"><div class="Progress-bar" id="2095"><p class="u-progress"><span class="pgbar" style="width:51%;"><span class="pging"></span></span></p><ul class="Pro-bar-li"><li class="P-bar01"><em>51</em>Already involved</li><li class="P-bar02"><em>100</em>Total demand</li><li class="P-bar03"><em>49</em>Surplus</li></ul></div></div></div></a><div class="changyu"><a class="buynow" id="2095" href="javascript:;"></a><a class="add " codeid="2095" href="javascript:;"><i></i></a></div></li></ul><ul id="2100"><li><a href="http://hy.yungoucms.cn/?/mobile/mobile/item/2100"><span id="2100" class="z-Limg"><img src="./all/74455580250569.png"></span><div class="goodsListR"><h2 id="2100">(Phase 4 )测试</h2><p class="price">value:<em class="arial gray"> ₹111</em></p><div class="pRate"><div class="Progress-bar" id="2100"><p class="u-progress"><span class="pgbar" style="width:0%;"><span class="pging"></span></span></p><ul class="Pro-bar-li"><li class="P-bar01"><em>0</em>Already involved</li><li class="P-bar02"><em>111</em>Total demand</li><li class="P-bar03"><em>111</em>Surplus</li></ul></div></div></div></a><div class="changyu"><a class="buynow" id="2100" href="javascript:;"></a><a class="add " codeid="2100" href="javascript:;"><i></i></a></div></li></ul><div id="divGoodsLoading" class="loading" style="display:none;height: 80px;"> <b></b> Loading...  </div>
    <a id="btnLoadMore" class="loading" href="javascript:;" style="display:none;"><i class="jiazai"></i> Click to load more </a>
	<a id="btnLoadMore2" class="loading" style="display:none; padding-top: 0px;">——————　I have a bottom line　——————</a>
	<a id="btnLoadMore3" class="loading" style="display: block; padding-top: 0px;">——————　I have a bottom line　——————</a> </div>
  
  <input id="urladdress" value="0" type="hidden">
  <input id="pagenum" value="2" type="hidden">
  <input id="is_shop" value="" type="hidden">
  <div id="addAll"><p>Buy All</p></div>
 <style>
.footerdi .f_home a.cur i {background-position: 0 -112px !important;}
.footerdi .f_whole a.cur i {background-position: 0 -222px !important;}
.footerdi .f_jiexiao a.cur i {background-position: 0 -169px !important;}
.footerdi .f_car a.cur i {background-position: 0 1px !important;}
.footerdi .f_personal a.cur i {background-position: 0 -57px !important;}
#btnGotoTop {padding: 0;width: 40px;height: 40px;border-radius: 40px;background:rgba(0,0,0,.6);box-shadow: 0 1px 8px #666;position: fixed;right: 8px;}
#btnGotoTop .s1 {background: url(./all/fast-nav-new.png) 0 -163px no-repeat;background-size: 21px auto;margin: 9px auto;display: block;width: 21px;height: 21px;}
.smailnav {position: fixed;right: 0px;bottom: 55px;z-index: 99999999;height: auto;}
#top_div {display: none;width: 40px;height: 80px;opacity: 0.8;border-bottom-left-radius: 5px;border-top-left-radius: 5px;}
#top_div1 {display: block;width: 40px;height: 40px;background: #242424;opacity: 0.8;border-bottom-left-radius: 5px;border-top-left-radius: 5px;}
#btnGotoTop3 {display: none;width: 100px;position: absolute;right: 0;top: -209px;padding: 0 10px;background: #242424;opacity: 0.7;border-bottom-left-radius: 5px;border-top-left-radius: 5px;}
#btnGotoTop3 a {display: block;height: 40px;line-height: 40px;width: 100%;padding: 0;color: #fff;clear: both;}
#btnGotoTop3 .xb {display: block;width: 10px;height: 10px;background: #242424;border-left: 1px solid #242424;border-top: 1px solid #242424;-webkit-transform: rotate(45deg);position: absolute;bottom: -5px;right: 10px;}
#btnGotoTop3 a i {background: url(./all/fast-nav-new.png) 0 0px no-repeat;width: 20px;height: 20px;margin: 10px 5px 0 0;display: block;vertical-align: middle;float: left;position: relative;background-size: 25px;left: 2px;}
#btnGotoTop3 a em {display: block;float: left;line-height: 42px;}
#btnGotoTop3 .home {border-bottom: 1px solid #4b4b4b;}
#btnGotoTop3 .home i {background-position: 0 1px;background-size: 28px auto;height: 22px;}
#btnGotoTop3 .glist {border-bottom: 1px solid #4b4b4b;}
#btnGotoTop3 .glist i {background-position: 0 -117px;background-size: 19px;}
#btnGotoTop3 .lottry {border-bottom: 1px solid #4b4b4b;}
#btnGotoTop3 .lottry i {background-position: 0 -35px;left: 0;}
#btnGotoTop3 .user {border-bottom: 1px solid #4b4b4b;}
#btnGotoTop3 .user i {background-position: 0 -113px;}
#btnGotoTop3 .sx i {background-position: 0 -213px;background-size: 22px auto;}
</style>
<div style="height:60px;clear:both;"></div>
<div class="footerdi" style="bottom: 0px;">
  <ul>
    <li class="f_home"> <a title="home page" href="http://hy.yungoucms.cn/" class=""> <i>&nbsp;</i> Home </a> </li>
    <li class="f_whole"> <a title="All goods" href="http://hy.yungoucms.cn/?/mobile/mobile/glist" class="cur"> <i>&nbsp;</i> Goods </a> </li>
    <li class="f_jiexiao"> <a title="Latest announcement" href="http://hy.yungoucms.cn/?/mobile/mobile/lottery/auto_lottery" class=""> <i>&nbsp;</i> Announce </a> </li>
    <li class="f_car"> <a title="Shopping Cart" href="http://hy.yungoucms.cn/?/mobile/cart/cartlist" class=""> <i id="btnCart" style="position: relative;">&nbsp;<em>2</em></i> Cart </a> </li>
    <li class="f_personal"> <a title="My homepage" href="http://hy.yungoucms.cn/?/mobile/home" class=""> <i>&nbsp;</i> Personal </a> </li>
  </ul>
  <div class="smailnav">
        <div id="btnGotoTop3" class="smailgb" style="display: none;">
            <a class="home" href="http://hy.yungoucms.cn/">
                <i></i> <em>Home</em>
            </a>
            <a class="glist" href="http://hy.yungoucms.cn/?/mobile/mobile/glist">
                <i></i> <em>All goods</em>
            </a>
            <a class="lottry" href="http://hy.yungoucms.cn/?/mobile/mobile/lottery">
                <i></i>
                <em>Latest announcement</em>
            </a>
            <a class="user" href="http://hy.yungoucms.cn/?/mobile/user/login">
                <i></i>
                <em>My mall</em>
            </a>
            <a id="shuaxin" class="sx" href="javascript:location.reload()">
                <i></i>
                <em>Refresh</em>
            </a>
            <i class="xb"></i>
        </div>
        <div id="top_div" style="display: none;">
            <a id="btnGotoTop" href="javascript:;">
                <i class="s1"></i>
            </a>
        </div>
    </div>

  <script type="text/javascript">
    //返回顶部
    $(function() {
        $("#btnGotoTop").click(function() {
            $("html,body").animate({
                scrollTop: 0
            }, 1500);
        });
    });

    window.onscroll = function() {
        var t = document.documentElement.scrollTop || document.body.scrollTop;
        var top_div = document.getElementById("top_div");
        var s = document.documentElement.scrollTop || document.body.scrollTop;
        //var top_div1 = document.getElementById("top_div1");
        if (t >= 200) {
            top_div.style.display = "block";
        } else {
            top_div.style.display = "none";
        }
   

    }


    function Show_Hidden(btnGotoTop3) {
        if (btnGotoTop3.style.display == "block") {
            btnGotoTop3.style.display = 'none';
        } else {
            btnGotoTop3.style.display = 'block';
        }
    }
    </script>
</div>
<script type="text/javascript">
//打开页面加载数据
window.onload=function(){
	// glist_json(0);
	
	//购物车数量
	// $.getJSON('http://hy.yungoucms.cn/?/mobile/ajax/cartnum',function(data){
	// 	if(data.num){
	// 		$("#btnCart").append('<em>'+data.num+'</em>');
	// 	}
	// });
	//一键添加
	$("#addAll").on('click',function(){
		var obj = document.getElementsByName("cateChk");
    	var check_val = [];
	    for(var k in obj){
	        if(obj[k].checked)
	            check_val.push(obj[k].value);
	    }
	    if(check_val.length < 1){
	    	MSG('Please select commodity classification！');
	    	return;
	    }else{
	    	$.getJSON('http://hy.yungoucms.cn/?/mobile/ajax/list_AddAll/'+check_val,function(data){
			 if(data.code == '0'){
			 	if(data.num == '0'){
			 		MSG('There are no goods in this category！');
			 	}else{
					MSG(''+data.num+'items added！');
		         	 setTimeout(function () {
	                    window.location.href="http://hy.yungoucms.cn/?/mobile/cart/cartlist";
	               	 }, 2000);			 		
			 	}

			}
	    	
	    	});
	    }

	})
	//底部一键添加
	$("#addAll").on('click',function(){
		var ids='';
		  $(".goodsList ul").each(function(){
		  	if(typeof($(this).attr('id')) != 'undefined'){
		  		ids +=$(this).attr('id')+','; 
		  	}
		    
		  });
		  if(ids){
	    	$.getJSON('http://hy.yungoucms.cn/?/mobile/ajax/list_DownAddAll/'+ids,function(data){
			 if(data.code == '0'){
			 	if(data.num == '0'){
			 		MSG('There are no goods in this category！');
			 	}else{
					MSG('A total of '+data.num+'piece commodity');
		         	 setTimeout(function () {
	                    window.location.href="http://hy.yungoucms.cn/?/mobile/cart/cartlist";
	               	 }, 2000);			 		
			 	}
	  		}
		 
		  		});
	    	 }
	})
}
	function check_shop(obj){
		var cateid=$(obj).attr('cateid');
		var catename=$(obj).attr('catename');
		$(".t_name").html(catename);
		$(".arrow-up").hide();
		$('#selectSort').hide();
		html='';
		html +='<div id="divGoodsLoading" class="loading" style="display:none;height: 80px;"> <b></b> Loading...  </div>'
	    html +='<a id="btnLoadMore" class="loading" href="javascript:;" style="display:none;"><i class="jiazai"></i> Click to load more </a>' 
	    html +='<a id="btnLoadMore2" class="loading"  style="display:none; padding-top: 0px;">No more</a>' 
	    html +="<a id='btnLoadMore3' class='loading'  style='display:none; padding-top: 0px;'>'It's all over'</a>"
		$(".goodsList").html(html);
		glist_json(cateid);
	}
	function MSG(dat){
		$("#pageDialogBG .Prompt").text("");
		var w=($(window).width()-255)/2,
			h=($(window).height()-45)/2;
		$("#pageDialogBG").css({top:h,left:w,opacity:0.8});
		$("#pageDialogBG").stop().fadeIn(1000);
		$("#pageDialogBG .Prompt").append('<s></s>'+dat);
		$("#pageDialogBG").fadeOut(1000);
	}
//获取数据
function glist_json(parm){
	$.getJSON('http://hy.yungoucms.cn/?/mobile/mobile/glist_ajax/'+parm,function(data){
		$("#divGoodsLoading").css('display','none');

		if(data[0].sum){
			$("#urladdress").val(data[0].c_id);
			$("#pagenum").val(data[0].page);
			for(var i=0;i<data.length;i++){			
				var ul='<ul id="'+data[i].id+'"><li><a href="http://hy.yungoucms.cn/?/mobile/mobile/item/'+data[i].id+'">';
				ul+='<span id="'+data[i].id+'" class="z-Limg">';
				if(data[i].ssc ==1){
					ul +='<i class="zimgs"></i>';
				} 
				ul+='<img src="http://hy.yungoucms.cn/statics/uploads/'+data[i].thumb+'"></span>';
				ul+='<div class="goodsListR">';
				ul+='<h2 id="'+data[i].id+'">(Phase '+data[i].qishu+' )'+data[i].title+'</h2>';
				ul+='<p class="price">value:<em class="arial gray"> ₹'+data[i].money+'</em></p>';
				ul+='<div class="pRate">';
				ul+='<div class="Progress-bar" id="'+data[i].id+'">';				
				ul+='<p class="u-progress"><span class="pgbar" style="width:'+(data[i].canyurenshu / data[i].zongrenshu)*100+'%;"><span class="pging"></span></span></p>';
				ul+='<ul class="Pro-bar-li">';
				ul+='<li class="P-bar01"><em>'+data[i].canyurenshu+'</em>Already involved</li>';
				ul+='<li class="P-bar02"><em>'+data[i].zongrenshu+'</em>Total demand</li>';
				ul+='<li class="P-bar03"><em>'+data[i].shenyurenshu+'</em>Surplus</li>';
				ul+='</ul></div>';
				ul+='</div></div></a>';
				ul+='<div class="changyu"><a class="buynow" id="'+data[i].id+'" href="javascript:;"></a>';
				ul+='<a class="add " codeid="'+data[i].id+'" href="javascript:;"><i></i></a>';
				ul+='</div></li></ul>';
				
				$("#divGoodsLoading").before(ul);

			}

			if(data[0].page<=data[0].sum){
				$("#btnLoadMore").css('display','block');
				$("#btnLoadMore2").css('display','none');
				$("#btnLoadMore3").css('display','none');
			}else if(data[0].page>data[0].sum){
				$("#btnLoadMore").css('display','none');
				$("#btnLoadMore2").css('display','none');
				$("#btnLoadMore3").css('display','block');
			}
		}else{
			$("#btnLoadMore").css('display','none');
			$("#btnLoadMore2").css('display','block');	
			$("#btnLoadMore3").css('display','none');			
		}
	});
}
//获取数据
function glist_json2(parm){
	$("#urladdress").val('');
	$("#pagenum").val('');
	$.getJSON('http://hy.yungoucms.cn/?/mobile/mobile/glistajax/'+parm,function(data){

		$("#divGoodsLoading").css('display','none');
		if(data[0].sum){
			$("#urladdress").val(data[0].c_id);
			$("#pagenum").val(data[0].page);
			$("#is_shop").val('1');
			for(var i=0;i<data.length;i++){			
				var ul='<ul id="'+data[i].id+'"><li><a href="http://hy.yungoucms.cn/?/mobile/mobile/item/'+data[i].id+'">';
				ul+='<span id="'+data[i].id+'" class="z-Limg">';
				if(data[i].ssc ==1){
					ul +='<i class="zimgs"></i>';
				} 
				ul+='<img src="http://hy.yungoucms.cn/statics/uploads/'+data[i].thumb+'"></span>';
				ul+='<div class="goodsListR">';
				ul+='<h2 id="'+data[i].id+'">(Phase '+data[i].qishu+' )'+data[i].title+'</h2>';
				ul+='<p class="price">value:<em class="arial gray">₹'+data[i].money+'</em></p>';
				ul+='<div class="pRate">';
				ul+='<div class="Progress-bar" id="'+data[i].id+'">';				
				ul+='<p class="u-progress"><span class="pgbar" style="width:'+(data[i].canyurenshu / data[i].zongrenshu)*100+'%;"><span class="pging"></span></span></p>';
				ul+='<ul class="Pro-bar-li">';
				ul+='<li class="P-bar01"><em>'+data[i].canyurenshu+'</em>Already involved</li>';
				ul+='<li class="P-bar02"><em>'+data[i].zongrenshu+'</em>Total demand</li>';
				ul+='<li class="P-bar03"><em>'+data[i].shenyurenshu+'</em>Surplus</li>';
				ul+='</ul></div>';
				ul+='</div></div></a>';
				ul+='<div class="changyu"><a class="buynow" id="'+data[i].id+'" href="javascript:;"></a>';
				ul+='<a class="add " codeid="'+data[i].id+'" href="javascript:;"><i></i></a>';
				ul+='</div></li></ul>';
				
				$("#divGoodsLoading").before(ul);

			}

			if(data[0].page<=data[0].sum){
				$("#btnLoadMore").css('display','block');
				$("#btnLoadMore2").css('display','none');
				$("#btnLoadMore3").css('display','none');
			}else if(data[0].page>data[0].sum){
				$("#btnLoadMore").css('display','none');
				$("#btnLoadMore2").css('display','none');
				$("#btnLoadMore3").css('display','block');
			}
		}else{
			$("#btnLoadMore").css('display','none');
			$("#btnLoadMore2").css('display','block');	
			$("#btnLoadMore3").css('display','none');			
		}
	});
}
$(document).ready(function(){
	$("#divSort").click(function(){
		$("#divOrder").removeClass("current");
		$(this).addClass("current");
		$(".arrow-up").toggle();
		$("#selectSort").slideToggle(200);
		$("#selectOrder").hide();
		event.stopPropagation();
	});
	
	$("#divOrder").click(function(){
		$("#divSort").removeClass("current");
		$(this).addClass("current");
		$("#selectOrder").toggle();
		$(".arrow-up").hide();
		$("#selectSort").hide();
		event.stopPropagation();
	});

	$("#selectSort").click(function(){
	event.stopPropagation();
	});
	

	
  //全选 
	$(".sort_list li:first").on('click', function() {
		var check=$(this).children('input:checkbox');
        $(".sort_list li input:checkbox").prop("checked", check.prop('checked'));
    }); 




	//即将揭晓,人气,最新,价格	
	$(".order_list li").click(function(){
		
		$(".order_list li").removeClass("current");
		$(this).addClass("current");
		
		var parm=$(this).attr('order');
			$(".goodsList ul").remove();
		var glist=glist_json2("list/"+parm);	
		var text = $(this).find("a").text();
		$("#divOrder span").html(text);
		$("#selectOrder").hide();
		
	});


	//自动加载
	 var oldpage='';
	$(window).scroll(function () {         
            if ($(document).height() - $(this).scrollTop() - $(this).height() < 1 && $('#btnLoadMore').css('display')!='none' ){
                var url=$("#urladdress").val(),page=$("#pagenum").val(),isshop=$("#is_shop").val();
				if(oldpage != page){ 
					oldpage=page;
					if(isshop == 1){
						// glist_json2(url+'/'+page);
					}else{			
							// glist_json(url+'/'+page);		

					}
				}else{
					return;
				}	
            }
        });

	//返回顶部
	$(window).scroll(function(){
		//其他
	  $("#selectSort").hide();
	  $(".arrow-up").hide();
	  $("#selectOrder").hide();
		if($(window).scrollTop()>50){
			$("#btnTop").show();
		}else{
			$("#btnTop").hide();
		}
	});
	$("#btnTop").click(function(){
		$("body").animate({scrollTop:0},10);
	});

	function addsuccess(dat){
		$("#pageDialogBG .Prompt").text("");
		var w=($(window).width()-255)/2,
			h=($(window).height()-45)/2;
		$("#pageDialogBG").css({top:h,left:w,opacity:0.8});
		$("#pageDialogBG").stop().fadeIn(1000);
		$("#pageDialogBG .Prompt").append('<s></s>'+dat);
		$("#pageDialogBG").fadeOut(1000);
		//购物车数量
		// $.getJSON('http://hy.yungoucms.cn/?/mobile/ajax/cartnum',function(data){
		// 	$("#btnCart").append('<em>'+data.num+'</em>');
		// });
	}
	//跳转页面
	var gt='.goodsList span,.goodsList h2,.goodsList .Progress-bar';
	$(document).on('click',gt,function(){
		var id=$(this).attr('id');
		if(id){
			window.location.href="http://hy.yungoucms.cn/?/mobile/mobile/item/"+id;
		}			
	});

});

</script>
  <script src="./all/jquery.fly.min.js"></script>
  <script>
//添加到购物车
$(document).on("click",'.add',function(event){
	var offset = $("#btnCart").offset();
	var codeid=$(this).attr('codeid');
		var addcar = $(this);
		var addcarparent = $(this).parent().prev();
		var img = addcar.parent().prev().find('img').attr('src');
		var flyer = $('<img class="u-flyer" src="'+img+'">');
		flyer.fly({
			start: {
				// <!-- left: event.pageX, -->
				left:addcarparent.offset().left+80,
				top: event.clientY-50
			},
			end: {
				left: offset.left,
				top: offset.top-$(document).scrollTop()+$("#btnCart").height(),
				width: 0,
				height: 0
			},
			onEnd: function(){
			
				$.getJSON('http://hy.yungoucms.cn/?/mobile/ajax/addShopCart/'+codeid+'/1',function(data){ 
					if(data.code==1){
						// <!-- addsuccess('Add failure');  -->
					}else if(data.code==0){
					var htm="<em>"+data.num+"</em>";
					$("#btnCart").html(htm);
						//  <!-- addsuccess('Add success');         -->
					 }return false; 
				 }); 
				this.destory(); 
			}
		});
	});

</script>
</div>


<style>
#pageDialogBG{-webkit-border-radius:5px; width:255px;height:45px;color:#fff;font-size:16px;text-align:center;line-height:45px;}
</style>
<div id="pageDialogBG" class="pageDialogBG">
  <div class="Prompt"></div>
</div></body></html>